package chapter14;

public class Circle extends GeometricObject {
	
	private double radius;
	
	public Circle(){
		this(1.0);
	}
	
	public Circle(double radius){
		this.radius = radius;
	}
	
	public Circle(double radius, String color, boolean filled){
		this.radius = radius;
		super.setColor(color);
		super.setFilled(filled);
	}
	
	public double getRadius(){
		return radius;
	}
	
	public void setRadius(double radius){
		this.radius = radius;
	}
	
	public double getDiameter(){
		return 2 * radius;
	}
	
	public double getArea(){
		return 3.14 * radius * radius;
	}
	
	public double getPerimeter(){
		return 2 * 3.14 * radius;
	}

	
}
